<!--[*
// ----------------------------------------------------------------------
// Source file:   $Source: /cvsroot/pn-commerce/pn-commerce/pntemplates/pncommerce_admin_editscheme.html,v $
//
// Last changes from:  $Author: landseer $
//
// Revision:           $Revision: 1.9 $
//
// Date of revision    $Date: 2005/03/29 13:07:47 $
//
// ----------------------------------------------------------------------
*]-->

<!--[ include file=pncommerce_admin_commonHeader.html ]-->

<!--[* pndebug *]-->
<fieldset>
    <legend>
        <!--[ pnml name='_PNC_EDITSCHEME' ]-->
    </legend>
    <br />
    <form name="schemeedit" action="<!--[ pnmodurl modname=pncommerce type=admin func=editscheme]-->" method="post">
    <div>
        <input type="hidden" name="schemeid" value="<!--[ $scheme.scheme_id ]-->">
        <div style="width: 80%;";
            <div style="width:40%; float:left;">
                <!--[ pnml name='_PNC_SCHEME_NAME' ]-->
            </div>
            <div style="width:40%; float:left;">
                <input type="text" name="schemename" size="60" maxlength="255" value="<!--[ $scheme.name ]-->">
            </div>
        </div>
        <div style="width: 80%;";
            <div style="width:40%; float:left;">
                <!--[ pnml name='_PNC_SCHEME_DESCRIPTION' ]-->
            </div>
            <div style="width:40%; float:left;">
                <input type="text" name="description" size="60" maxlength="255" value="<!--[ $scheme.description ]-->">
            </div>
        </div>
        <div style="width: 80%;";
            <div style="width:40%; float:left;">
                <!--[ pnml name='_PNC_SCHEME_TEMPLATEID' ]-->
            </div>
            <div style="width:40%; float:left;">
                <input type="text" name="templateid" size="5" maxlength="5" value="<!--[ $scheme.template_id ]-->">
            </div>
        </div>
        <div style="width: 80%;";
            <div style="width:40%; float:left;">
                <!--[ pnml name='_PNC_SCHEME_DELETE' ]-->
            </div>
            <div style="width:40%; float:left;">
                <input type="checkbox" name="deletescheme" value="1">
            </div>
        </div>

    </div>
    <!--[ if $scheme.scheme_id neq -1 ]-->
    <br />
    <div style="clear: both;">
        <fieldset>
            <legend>
                <!--[ pnml name='_PNC_PROPERTIESLIST' ]-->
            </legend>
            <div style="clear: both;">
            <!--[ foreach item=property from=$scheme.properties ]-->

                <div style="clear: both;">
                    <div style="width: 50px; float: left;">
                        <!--[ if $property.sortorder>2 ]-->
                        <a href="<!--[ pnmodurl modname=pncommerce type=admin func=moveproperty dir=up scheme_id=$property.scheme_id property_id=$property.property_id]-->"><!--[ pnimg src="up2.gif" ]--></a>&nbsp;
                        <!--[ else ]-->
                        <!--[ pnimg src=pixel.gif width=18 ]-->
                        <!--[ /if ]-->
                        <!--[ if $property.sortorder<(2 * count($scheme.properties)) ]-->
                        <a href="<!--[ pnmodurl modname=pncommerce type=admin func=moveproperty dir=down scheme_id=$property.scheme_id property_id=$property.property_id]-->"><!--[ pnimg src="down2.gif" ]--></a>&nbsp;
                        <!--[ else ]-->
                        <!--[ pnimg src=pixel.gif width=18 ]-->
                        <!--[ /if ]-->
                    </div>
                    <div style="width: 500px; float: left;">
                        <!--[ pnml name='_PNC_PROPERTYNAME' ]-->:&nbsp;(<strong><!--[ $property.info ]--></strong>)
                        <input type='text' size="40" maxlength="255" name='<!--[$property.property_id]-->_<!--[$property.type]-->api_name' value='<!--[$property.name]-->'>&nbsp;
                    </div>
                </div>
                <div style="clear: both;">
                    <div style="width: 50px; float: left;">&nbsp;</div>
                    <div style="float: left;">
                        <input type="checkbox" name="<!--[$property.property_id]-->_<!--[$property.type]-->api_hidden" value="1" <!--[ if $property.hidden eq 1 ]-->checked="checked"<!--[ /if ]-->>
                        <!--[ pnml name='_PNC_HIDDEN' ]-->
                        <input type="checkbox" name="<!--[$property.property_id]-->_<!--[$property.type]-->api_delete" value="1">
                        <!--[ pnml name='_DELETE' ]-->
                    </div>
                </div>

                <div style="clear: both;">
                    <div style="width: 50px; float: left;">&nbsp;</div>
                    <div style="float: left;">
                        <!--[ pnmodapifunc modname=pncommerce type=$property.type func=getVisualOutput purpose=schemeedit property=$property ]-->
                    </div>
                </div>
                <div style="clear: both;">
                    <hr />
                </div>
            <!--[ foreachelse ]-->
                <!--[ pnml name='_PNC_NOPROPERTIESDEFINED' ]-->
            <!--[ /foreach ]-->
            </div>
        </fieldset>
    </div>
    <!--[ /if ]-->
    <div style="clear: both;">
        <input type="submit" name="submit" value="<!--[ pnml name='_SUBMIT' ]-->">
    </div>
    </form>
    <form action="<!--[ pnmodurl modname=pncommerce type=admin func=addproperty ]-->" method="post">
    <!--[ if $scheme.scheme_id neq -1 ]-->
    <div style="clear: both; width:90%;">
        <!--[ pnml name='_PNC_ADDNEWPROPERTY' ]-->:&nbsp;
        <input type="hidden" name="schemeid" value="<!--[ $scheme.scheme_id ]-->">
        <select name="newpropertytype">
            <!--[ foreach item=newproperty from=$availableproperties ]-->
            <option value="<!--[ $newproperty.name ]-->"><!--[ $newproperty.info ]--></option>
            <!--[ /foreach ]-->
        </select>
        &nbsp;
        <input type="submit" name="addproperty" value="<!--[ pnml name='_PNC_ADD' ]-->">
        &nbsp;
        <select name="newpropertysortorder">
            <option value="0"><!--[ pnml name='_PNC_ADDPROPERTYONTOP' ]--></option>
            <!--[ foreach item=property from=$scheme.properties ]-->
            <option value="<!--[ $property.sortorder+1 ]-->"><!--[ pnml name='_PNC_ADDPROPERTYAFTER' ]-->&nbsp;<!--[ $property.name ]--></option>
            <!--[ assign var=lastsortorder value=$property.sortorder+2 ]-->
            <!--[ /foreach ]-->
            <option value="<!--[ $lastsortorder ]-->" selected="selected"><!--[ pnml name='_PNC_ADDPROPERTYATBOTTOM' ]--></option>
        </select>
    </div>
    </form>
    <!--[ /if ]-->
</fieldset>

<!--[*pndebug*]-->


<!--[ include file=pncommerce_admin_commonFooter.html ]-->
